﻿using System;
using System.Data.SqlTypes;

namespace ConsoleApp9
{
    class Program
    {
        static void Main(string[] args)
        {
            var connectionString = "server=.;datebase=master;lntegrated security = true";

            SqlConnection sqlconnection = new SqlConnection(connectionString);

            sqlconnection.Open();

            sqlCommand command = new sqlCommand("select * from cinema", sqlconnection);

            var reader = command.ExecuteNonQuery();

            Console.WriteLine("{0}\t{1}\t{2}\t{3}", "id", "作品", "类型", "排名");

            while (reader.Read())
            {
                Console.WriteLine("{0}\t{1}\t{2}\t{3}", reader["id"], reader["works"], reader["description"], reader["rank"]);
            }
            sqlconnection.Close();
        }

        
    }

  
}
